
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>7.3 chinese-number-format插件 · uniapp/uniapp-x for Harmony教程</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="坚果派">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-mind-maps/mindmaps.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-emphasize/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-ace/ace.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-theme-lou/lou.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../styles/website.css">
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="4.calendar插件.html" />
    
    
    <link rel="prev" href="2.uniappx插件nutpi-idcard 开发与使用指南（适配鸿蒙）.html" />
    

    <style>
    @media only screen and (max-width: 640px) {
        .book-header .hidden-mobile {
            display: none;
        }
    }
    </style>
    <script>
        window["gitbook-plugin-github-buttons"] = {"repo":"ITmxs/gitbook","types":["star","watch","fork"],"size":"small"};
    </script>

    </head>
    <body>
         
<div class="donate-modal modal">
  <div class="modal-header">
    <div>
      <span>
        <img
          id="modal-avatar"
          class="modal-avatar"
          src="http://xkapp-uat.oss-cn-hangzhou.aliyuncs.com/2e7a3f70-80ab-4b50-93ec-a04dfeef949b/avatar-100.png"
        />
      </span>
      <span id="nickname"> breeze </span>
      <p class="modal-close close" onclick="closeDonateModal()">×</p>
    </div>
    <div class="message">
      <div class="tip">
        <i></i>
        <span>随意打赏，但不要超过一顿早餐钱 💕</span>
      </div>
    </div>
  </div>
  <div class="modal-content">
    <div class="modal-pay-way">
      <div id="wxpay" onclick="showDonateImg(0)">
        <input
          type="radio"
          name="pay-way"
          value="wxpay"
          class="zs-type"
          checked="checked"
        />
        <span>
          <img
            id="wxpay-logo"
            src=""
          />
        </span>
      </div>
      <div id="alipay" onclick="showDonateImg(1)">
        <input type="radio" name="pay-way" value="alipay" class="zs-type" />
        <span>
          <img
            id="alipay-logo"
            src=""
          />
        </span>
      </div>
    </div>
    <div class="modal-pay-qrcode">
      <img id="wxpay-code" src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png" />
      <img
        id="alipay-code"
        src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202843746.png"
        hidden
      />
    </div>
  </div>
</div>
<div class="mask"></div>


<div class="book">
  <div class="header-inner">
    <!-- LOGO -->
    <div class="logo"></div>
    <span class="title"></span>

    <!-- Search -->
    
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>


    <!-- Nav -->
    <ul class="header-nav">
      <li>
        <a href="https://www.nutpi.net/" target="_blank">坚果派官网</a>
      </li><li>
        <a href="https://www.arkui.club/" target="_blank">ArkUI实战</a>
      </li><li>
        <a href="https://space.bilibili.com/480883651" target="_blank">元服务开发实践</a>
      </li><li>
        <a href="https://gitcode.com/nutpi" target="_blank">OpenHarmony应用开发</a>
      </li>
    </ul>
  </div>

  <div class="book-summary">
    <div class="book-summary-title">文档目录</div>
     
    <nav role="navigation">


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    1.前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../chapter2/1.为什么.html">
            
                <a href="../chapter2/1.为什么.html">
            
                    
                    2.为什么要这个专栏？
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    3.uniapp开发鸿蒙
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../chapter3/14.背景.md">
            
                <span>
            
                    
                    3.1背景
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../chapter3/15.优势.html">
            
                <a href="../chapter3/15.优势.html">
            
                    
                    3.2优势
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../chapter3/1.uniapp开发鸿蒙应用.html">
            
                <a href="../chapter3/1.uniapp开发鸿蒙应用.html">
            
                    
                    3.3uniapp开发鸿蒙应用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../chapter3/3.uniapp之uts语言.html">
            
                <a href="../chapter3/3.uniapp之uts语言.html">
            
                    
                    3.4uniapp之uts语言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../chapter3/4.uniapp for Harmony.html">
            
                <a href="../chapter3/4.uniapp for Harmony.html">
            
                    
                    3.5uniapp for Harmony
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="../chapter3/5.uniapp for Harmony FAQ.html">
            
                <a href="../chapter3/5.uniapp for Harmony FAQ.html">
            
                    
                    3.6uniapp for Harmony FAQ
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.7" data-path="../chapter3/2.uniapp2.html">
            
                <a href="../chapter3/2.uniapp2.html">
            
                    
                    3.7uniapp2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.8" data-path="../chapter3/6.uniappx支持鸿蒙.html">
            
                <a href="../chapter3/6.uniappx支持鸿蒙.html">
            
                    
                    3.8uniappx支持鸿蒙
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.9" data-path="../chapter3/7.uniapp-x支持鸿蒙.html">
            
                <a href="../chapter3/7.uniapp-x支持鸿蒙.html">
            
                    
                    3.9uniapp-x支持鸿蒙
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.10" data-path="../chapter3/8.目前支持鸿蒙手机.html">
            
                <a href="../chapter3/8.目前支持鸿蒙手机.html">
            
                    
                    3.10目前支持鸿蒙手机
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.11" data-path="../chapter3/9.uniapp-x项目开发鸿蒙支持调试啦.html">
            
                <a href="../chapter3/9.uniapp-x项目开发鸿蒙支持调试啦.html">
            
                    
                    3.11uniapp-x项目开发鸿蒙支持调试啦
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.12" data-path="../chapter3/10.uniapp和flutter你会选哪个来开发鸿蒙.html">
            
                <a href="../chapter3/10.uniapp和flutter你会选哪个来开发鸿蒙.html">
            
                    
                    3.12uniapp和flutter你会选哪个来开发鸿蒙
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.13" data-path="../chapter3/11.Flutter与uni-app的深度对比：鸿蒙开发的最佳选择竟是原生开发.md.md">
            
                <span>
            
                    
                    3.13Flutter与uni-app的深度对比：鸿蒙开发的最佳选择竟是原生开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.14" data-path="../chapter3/12.uniapp版本更新.html">
            
                <a href="../chapter3/12.uniapp版本更新.html">
            
                    
                    3.14uniapp版本更新
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.15" data-path="../chapter3/13.HBuilderX 4.62 开始，uni-app 支持嵌入鸿蒙原生组件.html">
            
                <a href="../chapter3/13.HBuilderX 4.62 开始，uni-app 支持嵌入鸿蒙原生组件.html">
            
                    
                    3.15HBuilderX 4.62开始，uni-app支持嵌入鸿蒙原生组件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.16" data-path="../chapter3/16.uni-app x 已经完成鸿蒙等主流平台全覆盖.html">
            
                <a href="../chapter3/16.uni-app x 已经完成鸿蒙等主流平台全覆盖.html">
            
                    
                    3.16uni-app x 已经完成鸿蒙等主流平台全覆盖
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.17" data-path="../chapter3/17.uniapp如何进行条件编译到鸿蒙.html">
            
                <a href="../chapter3/17.uniapp如何进行条件编译到鸿蒙.html">
            
                    
                    3.17uniapp如何进行条件编译到鸿蒙
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.18" data-path="../chapter3/18.鸿蒙Next案例分析.html">
            
                <a href="../chapter3/18.鸿蒙Next案例分析.html">
            
                    
                    3.18鸿蒙Next案例分析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.19" data-path="../chapter3/19.UTS开发鸿蒙插件.md">
            
                <span>
            
                    
                    3.19UTS开发鸿蒙插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.20" data-path="../chapter3/20.热重载.html">
            
                <a href="../chapter3/20.热重载.html">
            
                    
                    3.20热重载
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.21" data-path="../chapter3/21.调用鸿蒙原生组件.html">
            
                <a href="../chapter3/21.调用鸿蒙原生组件.html">
            
                    
                    3.21调用鸿蒙原生组件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.22" data-path="../chapter3/22.从开发者视角看 uniapp 与 Flutter 的差异.html">
            
                <a href="../chapter3/22.从开发者视角看 uniapp 与 Flutter 的差异.html">
            
                    
                    3.22从开发者视角看 uniapp 与 Flutter 的差异
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.23" data-path="../chapter3/23.uniappforHarmony学习路线.html">
            
                <a href="../chapter3/23.uniappforHarmony学习路线.html">
            
                    
                    3.23uniappforHarmony学习路线
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    4.随机笑话-实战案例
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../chapter4/1.uni-app_x跨平台实战入门：从0到1开发HarmonyOS_5鸿蒙原生应用.html">
            
                <a href="../chapter4/1.uni-app_x跨平台实战入门：从0到1开发HarmonyOS_5鸿蒙原生应用.html">
            
                    
                    4.1 uni-app x 跨平台实战入门：从 0 到 1 开发 HarmonyOS 5 鸿蒙原生应用
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    5.二十四节气
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" >
            
                <span>
            
                    
                    5.1二十四节气实战案例
            
                </span>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" >
            
                <span>
            
                    
                    6.UTS插件开发
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../chapter6/1.UTS开发鸿蒙插件.html">
            
                <a href="../chapter6/1.UTS开发鸿蒙插件.html">
            
                    
                    6.1 UTS开发鸿蒙插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../chapter6/2.开发uts插件.html">
            
                <a href="../chapter6/2.开发uts插件.html">
            
                    
                    6.2 开发uts插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../chapter6/3.新建鸿蒙插件.html">
            
                <a href="../chapter6/3.新建鸿蒙插件.html">
            
                    
                    6.3 新建鸿蒙插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../chapter6/4.鸿蒙使用插件.md">
            
                <span>
            
                    
                    6.4 鸿蒙使用插件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" >
            
                <span>
            
                    
                    7.鸿蒙插件实战
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="1.开发鸿蒙插件.html">
            
                <a href="1.开发鸿蒙插件.html">
            
                    
                    7.1 开发鸿蒙插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="2.uniappx插件nutpi-idcard 开发与使用指南（适配鸿蒙）.html">
            
                <a href="2.uniappx插件nutpi-idcard 开发与使用指南（适配鸿蒙）.html">
            
                    
                    7.2 uniappx插件nutpi-idcard开发与使用指南
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.7.3" data-path="3.chinese-number-format插件.html">
            
                <a href="3.chinese-number-format插件.html">
            
                    
                    7.3 chinese-number-format插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="4.calendar插件.html">
            
                <a href="4.calendar插件.html">
            
                    
                    7.4 calendar插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.5" data-path="5.HBuilderX 中适配鸿蒙插件的安装使用指南.html">
            
                <a href="5.HBuilderX 中适配鸿蒙插件的安装使用指南.html">
            
                    
                    7.5 HBuilderX中适配鸿蒙插件的安装使用指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6" data-path="OpenHarmony5.0跟华为HarmonyOS之间的应用生态兼容情况.html">
            
                <a href="OpenHarmony5.0跟华为HarmonyOS之间的应用生态兼容情况.html">
            
                    
                    7.6 OpenHarmony与HarmonyOS兼容性
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>

</nav>
     
  </div>

  <!-- Content nav -->
  <div class="book-anchor">
    <div class="book-anchor-title"></div>

    <div class="book-anchor-body"></div>
  </div>

  <div class="book-body">
    
    <div class="body-inner">
       

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >7.3 chinese-number-format插件</a>
    </h1>
</div>



      <div class="page-wrapper" tabindex="-1" role="main">
        <div class="page-inner">
          
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
          <section class="normal markdown-section">
             
                <div id="vip-container">
                    <h1 id="nutpi-chinese-number-format&#xFF1A;&#x5F3A;&#x5927;&#x7684;&#x4E2D;&#x6587;&#x6570;&#x5B57;&#x683C;&#x5F0F;&#x5316;-uts-&#x63D2;&#x4EF6;&#xFF08;&#x9002;&#x914D;&#x9E3F;&#x8499;&#xFF09;"><a name="nutpi-chinese-number-format&#xFF1A;&#x5F3A;&#x5927;&#x7684;&#x4E2D;&#x6587;&#x6570;&#x5B57;&#x683C;&#x5F0F;&#x5316;-uts-&#x63D2;&#x4EF6;&#xFF08;&#x9002;&#x914D;&#x9E3F;&#x8499;&#xFF09;" class="plugin-anchor" href="#nutpi-chinese-number-format&#xFF1A;&#x5F3A;&#x5927;&#x7684;&#x4E2D;&#x6587;&#x6570;&#x5B57;&#x683C;&#x5F0F;&#x5316;-uts-&#x63D2;&#x4EF6;&#xFF08;&#x9002;&#x914D;&#x9E3F;&#x8499;&#xFF09;"><i class="fa fa-link" aria-hidden="true"></i></a>nutpi-chinese-number-format&#xFF1A;&#x5F3A;&#x5927;&#x7684;&#x4E2D;&#x6587;&#x6570;&#x5B57;&#x683C;&#x5F0F;&#x5316; UTS &#x63D2;&#x4EF6;&#xFF08;&#x9002;&#x914D;&#x9E3F;&#x8499;&#xFF09;</h1>
<h2 id="&#x524D;&#x8A00;"><a name="&#x524D;&#x8A00;" class="plugin-anchor" href="#&#x524D;&#x8A00;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x524D;&#x8A00;</h2>
<p>&#x5728;&#x79FB;&#x52A8;&#x5E94;&#x7528;&#x5F00;&#x53D1;&#x4E2D;&#xFF0C;&#x6570;&#x5B57;&#x7684;&#x672C;&#x5730;&#x5316;&#x663E;&#x793A;&#x662F;&#x4E00;&#x4E2A;&#x5E38;&#x89C1;&#x9700;&#x6C42;&#x3002;&#x7279;&#x522B;&#x662F;&#x5728;&#x4E2D;&#x6587;&#x73AF;&#x5883;&#x4E0B;&#xFF0C;&#x6211;&#x4EEC;&#x7ECF;&#x5E38;&#x9700;&#x8981;&#x5C06;&#x963F;&#x62C9;&#x4F2F;&#x6570;&#x5B57;&#x8F6C;&#x6362;&#x4E3A;&#x4E2D;&#x6587;&#x6570;&#x5B57;&#xFF0C;&#x6216;&#x8005;&#x8FDB;&#x884C;&#x76F8;&#x53CD;&#x7684;&#x8F6C;&#x6362;&#x3002;&#x4ECA;&#x5929;&#x4E3A;&#x5927;&#x5BB6;&#x4ECB;&#x7ECD;&#x4E00;&#x4E2A;&#x529F;&#x80FD;&#x5F3A;&#x5927;&#x7684; UTS &#x63D2;&#x4EF6; &#x2014;&#x2014; <code>nutpi-chinese-number-format</code>&#xFF0C;&#x5B83;&#x4E13;&#x95E8;&#x89E3;&#x51B3;&#x4E2D;&#x6587;&#x6570;&#x5B57;&#x683C;&#x5F0F;&#x5316;&#x7684;&#x5404;&#x79CD;&#x9700;&#x6C42;&#x3002;</p>
<h2 id="&#x63D2;&#x4EF6;&#x6982;&#x8FF0;"><a name="&#x63D2;&#x4EF6;&#x6982;&#x8FF0;" class="plugin-anchor" href="#&#x63D2;&#x4EF6;&#x6982;&#x8FF0;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x63D2;&#x4EF6;&#x6982;&#x8FF0;</h2>
<p><code>nutpi-chinese-number-format</code> &#x662F;&#x4E00;&#x4E2A;&#x4E13;&#x4E3A; uni-app &#x548C; uni-app x &#x9879;&#x76EE;&#x8BBE;&#x8BA1;&#x7684;&#x4E2D;&#x6587;&#x6570;&#x5B57;&#x683C;&#x5F0F;&#x5316;&#x63D2;&#x4EF6;&#x3002;&#x5B83;&#x57FA;&#x4E8E; UTS&#xFF08;UniApp TypeScript&#xFF09;&#x6280;&#x672F;&#x5F00;&#x53D1;&#xFF0C;&#x63D0;&#x4F9B;&#x4E86;&#x5B8C;&#x6574;&#x7684; TypeScript &#x7C7B;&#x578B;&#x5B9A;&#x4E49;&#xFF0C;&#x786E;&#x4FDD;&#x5F00;&#x53D1;&#x8FC7;&#x7A0B;&#x4E2D;&#x7684;&#x7C7B;&#x578B;&#x5B89;&#x5168;&#x3002;</p>
<h3 id="&#x1F31F;-&#x6838;&#x5FC3;&#x7279;&#x6027;"><a name="&#x1F31F;-&#x6838;&#x5FC3;&#x7279;&#x6027;" class="plugin-anchor" href="#&#x1F31F;-&#x6838;&#x5FC3;&#x7279;&#x6027;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x1F31F; &#x6838;&#x5FC3;&#x7279;&#x6027;</h3>
<ul>
<li>&#x2705; <strong>&#x53CC;&#x5411;&#x8F6C;&#x6362;</strong>&#xFF1A;&#x652F;&#x6301;&#x963F;&#x62C9;&#x4F2F;&#x6570;&#x5B57;&#x4E0E;&#x4E2D;&#x6587;&#x6570;&#x5B57;&#x4E4B;&#x95F4;&#x7684;&#x53CC;&#x5411;&#x8F6C;&#x6362;</li>
<li>&#x2705; <strong>&#x5927;&#x5199;&#x652F;&#x6301;</strong>&#xFF1A;&#x652F;&#x6301;&#x4E2D;&#x6587;&#x6570;&#x5B57;&#x5927;&#x5199;&#x683C;&#x5F0F;&#x8F6C;&#x6362;&#xFF08;&#x5982;&#xFF1A;&#x58F9;&#x3001;&#x8D30;&#x3001;&#x53C1;&#xFF09;</li>
<li>&#x2705; <strong>&#x5355;&#x4F4D;&#x5904;&#x7406;</strong>&#xFF1A;&#x667A;&#x80FD;&#x5904;&#x7406;&#x4E07;&#x3001;&#x4EBF;&#x7B49;&#x4E2D;&#x6587;&#x6570;&#x5B57;&#x5355;&#x4F4D;</li>
<li>&#x2705; <strong>&#x8FD1;&#x4F3C;&#x8868;&#x793A;</strong>&#xFF1A;&#x652F;&#x6301;&#x5927;&#x6570;&#x5B57;&#x7684;&#x8FD1;&#x4F3C;&#x4E2D;&#x6587;&#x8868;&#x793A;</li>
<li>&#x2705; <strong>&#x6708;&#x4EFD;&#x8F6C;&#x6362;</strong>&#xFF1A;&#x652F;&#x6301;&#x6570;&#x5B57;&#x6708;&#x4EFD;&#x8F6C;&#x4E2D;&#x6587;&#x6708;&#x4EFD;&#xFF08;&#x5305;&#x62EC;&#x4F20;&#x7EDF;&#x6708;&#x4EFD;&#x540D;&#x79F0;&#xFF09;</li>
<li>&#x2705; <strong>&#x591A;&#x5730;&#x533A;&#x652F;&#x6301;</strong>&#xFF1A;&#x540C;&#x65F6;&#x652F;&#x6301;&#x7B80;&#x4F53;&#x4E2D;&#x6587;&#xFF08;zh-CN&#xFF09;&#x548C;&#x7E41;&#x4F53;&#x4E2D;&#x6587;&#xFF08;zh-TW&#xFF09;</li>
<li>&#x2705; <strong>&#x8DE8;&#x5E73;&#x53F0;&#x517C;&#x5BB9;</strong>&#xFF1A;&#x652F;&#x6301; App&#xFF08;Android/iOS/Harmony&#xFF09;&#x3001;H5&#x3001;&#x5C0F;&#x7A0B;&#x5E8F;&#x7B49;&#x591A;&#x4E2A;&#x5E73;&#x53F0;</li>
<li>&#x2705; <strong>&#x7C7B;&#x578B;&#x5B89;&#x5168;</strong>&#xFF1A;&#x5B8C;&#x6574;&#x7684; TypeScript &#x7C7B;&#x578B;&#x5B9A;&#x4E49;</li>
</ul>
<h2 id="&#x5F00;&#x53D1;&#x8FC7;&#x7A0B;"><a name="&#x5F00;&#x53D1;&#x8FC7;&#x7A0B;" class="plugin-anchor" href="#&#x5F00;&#x53D1;&#x8FC7;&#x7A0B;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5F00;&#x53D1;&#x8FC7;&#x7A0B;</h2>
<p>&#x6211;&#x4EEC;&#x9700;&#x8981;&#x5982;&#x56FE;&#x65B9;&#x5F0F;&#xFF0C;&#x5148;&#x521B;&#x5EFA;&#x9879;&#x76EE;&#xFF0C;&#x9009;&#x62E9;uniappx&#xFF0C;vue3</p>
<p><img src="https://nutpi-e41b.obs.cn-north-4.myhuaweicloud.com/image-20250605231523307.png" alt="image-20250605231523307"></p>
<p>&#x63A5;&#x4E0B;&#x6765;&#x6211;&#x4EEC;&#x5C31;&#x53EF;&#x4EE5;&#x65B0;&#x5EFA;uni_modules&#x63D2;&#x4EF6;&#xFF0C;&#x8FD9;&#x91CC;&#x9762;&#x6211;&#x4EEC;&#x9009;&#x62E9;uts&#x63D2;&#x4EF6;-API&#x63D2;&#x4EF6;&#x3002;</p>
<p><img src="https://nutpi-e41b.obs.cn-north-4.myhuaweicloud.com/image-20250605231648288.png" alt="image-20250605231648288"></p>
<p>&#x540E;&#x9762;&#x5C31;&#x662F;&#x5927;&#x5BB6;&#x7F16;&#x5199;&#x4EE3;&#x7801;&#x7684;&#x8FC7;&#x7A0B;&#x4E86;&#xFF0C;&#x8FD9;&#x91CC;&#x9762;&#x9700;&#x8981;&#x6CE8;&#x610F;&#x7684;&#x662F;&#xFF0C;&#x56E0;&#x4E3A;&#x8FD9;&#x4E2A;&#x63D2;&#x4EF6;&#x548C;&#x5E73;&#x53F0;&#x7684;&#x5173;&#x8054;&#x6027;&#x4E0D;&#x662F;&#x5F88;&#x5927;&#xFF0C;&#x6240;&#x4EE5;&#x6211;&#x4EEC;&#x5728;&#x63D2;&#x4EF6;&#x7684;&#x6839;&#x76EE;&#x5F55;&#x4E0B;&#x521B;&#x5EFA;index.uts&#x91CC;&#x9762;&#x5B9E;&#x73B0;&#x6211;&#x7684;&#x903B;&#x8F91;&#x5C31;&#x597D;&#x3002;</p>
<h2 id="&#x6280;&#x672F;&#x67B6;&#x6784;"><a name="&#x6280;&#x672F;&#x67B6;&#x6784;" class="plugin-anchor" href="#&#x6280;&#x672F;&#x67B6;&#x6784;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6280;&#x672F;&#x67B6;&#x6784;</h2>
<h3 id="uts-&#x6280;&#x672F;&#x4F18;&#x52BF;"><a name="uts-&#x6280;&#x672F;&#x4F18;&#x52BF;" class="plugin-anchor" href="#uts-&#x6280;&#x672F;&#x4F18;&#x52BF;"><i class="fa fa-link" aria-hidden="true"></i></a>UTS &#x6280;&#x672F;&#x4F18;&#x52BF;</h3>
<p>&#x8BE5;&#x63D2;&#x4EF6;&#x91C7;&#x7528; UTS&#xFF08;UniApp TypeScript&#xFF09;&#x6280;&#x672F;&#x5F00;&#x53D1;&#xFF0C;&#x76F8;&#x6BD4;&#x4F20;&#x7EDF;&#x7684; JavaScript &#x63D2;&#x4EF6;&#x5177;&#x6709;&#x4EE5;&#x4E0B;&#x4F18;&#x52BF;&#xFF1A;</p>
<ol>
<li><strong>&#x6027;&#x80FD;&#x4F18;&#x5316;</strong>&#xFF1A;UTS &#x7F16;&#x8BD1;&#x540E;&#x7684;&#x4EE3;&#x7801;&#x6027;&#x80FD;&#x66F4;&#x63A5;&#x8FD1;&#x539F;&#x751F;</li>
<li><strong>&#x7C7B;&#x578B;&#x5B89;&#x5168;</strong>&#xFF1A;&#x5B8C;&#x6574;&#x7684; TypeScript &#x652F;&#x6301;&#xFF0C;&#x51CF;&#x5C11;&#x8FD0;&#x884C;&#x65F6;&#x9519;&#x8BEF;</li>
<li><strong>&#x8DE8;&#x5E73;&#x53F0;&#x4E00;&#x81F4;&#x6027;</strong>&#xFF1A;&#x5728;&#x4E0D;&#x540C;&#x5E73;&#x53F0;&#x4E0A;&#x4FDD;&#x6301;&#x4E00;&#x81F4;&#x7684;&#x884C;&#x4E3A;</li>
<li><strong>&#x5F00;&#x53D1;&#x4F53;&#x9A8C;</strong>&#xFF1A;&#x66F4;&#x597D;&#x7684; IDE &#x652F;&#x6301;&#x548C;&#x4EE3;&#x7801;&#x63D0;&#x793A;</li>
</ol>
<h3 id="&#x6838;&#x5FC3;&#x7B97;&#x6CD5;&#x8BBE;&#x8BA1;"><a name="&#x6838;&#x5FC3;&#x7B97;&#x6CD5;&#x8BBE;&#x8BA1;" class="plugin-anchor" href="#&#x6838;&#x5FC3;&#x7B97;&#x6CD5;&#x8BBE;&#x8BA1;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6838;&#x5FC3;&#x7B97;&#x6CD5;&#x8BBE;&#x8BA1;</h3>
<p>&#x63D2;&#x4EF6;&#x5185;&#x90E8;&#x91C7;&#x7528;&#x4E86;&#x9AD8;&#x6548;&#x7684;&#x6620;&#x5C04;&#x8868;&#x8BBE;&#x8BA1;&#xFF1A;</p>
<pre><code class="lang-typescript"><span class="hljs-comment">// &#x57FA;&#x672C;&#x6570;&#x5B57;&#x6620;&#x5C04;</span>
<span class="hljs-keyword">const</span> NUMBER_MAPS = {
  base: {
    <span class="hljs-string">&quot;0&quot;</span>: [<span class="hljs-string">&quot;0&quot;</span>, <span class="hljs-string">&quot;&#xFF10;&quot;</span>, <span class="hljs-string">&quot;&#x96F6;&quot;</span>, <span class="hljs-string">&quot;&#x3007;&quot;</span>],
    <span class="hljs-string">&quot;1&quot;</span>: [<span class="hljs-string">&quot;1&quot;</span>, <span class="hljs-string">&quot;&#xFF11;&quot;</span>, <span class="hljs-string">&quot;&#x4E00;&quot;</span>, <span class="hljs-string">&quot;&#x58F9;&quot;</span>],
    <span class="hljs-string">&quot;2&quot;</span>: [<span class="hljs-string">&quot;2&quot;</span>, <span class="hljs-string">&quot;&#xFF12;&quot;</span>, <span class="hljs-string">&quot;&#x4E8C;&quot;</span>, <span class="hljs-string">&quot;&#x8CB3;&quot;</span>, <span class="hljs-string">&quot;&#x8D30;&quot;</span>],
    <span class="hljs-comment">// ...</span>
  },
  <span class="hljs-string">&quot;zh-TW&quot;</span>: {
    units: [<span class="hljs-string">&quot;&quot;</span>, <span class="hljs-string">&quot;&#x5341;&quot;</span>, <span class="hljs-string">&quot;&#x767E;&quot;</span>, <span class="hljs-string">&quot;&#x5343;&quot;</span>],
    bigUnits: [
      <span class="hljs-string">&quot;&quot;</span>,
      <span class="hljs-string">&quot;&#x842C;&quot;</span>,
      <span class="hljs-string">&quot;&#x5104;&quot;</span>,
      <span class="hljs-string">&quot;&#x5146;&quot;</span>,
      <span class="hljs-string">&quot;&#x4EAC;&quot;</span>,
      <span class="hljs-string">&quot;&#x5793;&quot;</span>,
      <span class="hljs-string">&quot;&#x79ED;&quot;</span>,
      <span class="hljs-string">&quot;&#x7A70;&quot;</span>,
      <span class="hljs-string">&quot;&#x6E9D;&quot;</span>,
      <span class="hljs-string">&quot;&#x6F97;&quot;</span>,
      <span class="hljs-string">&quot;&#x6B63;&quot;</span>,
      <span class="hljs-string">&quot;&#x8F09;&quot;</span>,
    ],
    point: <span class="hljs-string">&quot;&#x9EDE;&quot;</span>,
    uppercase: {
      <span class="hljs-comment">/* &#x7E41;&#x4F53;&#x5927;&#x5199;&#x6620;&#x5C04; */</span>
    },
  },
  <span class="hljs-string">&quot;zh-CN&quot;</span>: {
    units: [<span class="hljs-string">&quot;&quot;</span>, <span class="hljs-string">&quot;&#x5341;&quot;</span>, <span class="hljs-string">&quot;&#x767E;&quot;</span>, <span class="hljs-string">&quot;&#x5343;&quot;</span>],
    bigUnits: [
      <span class="hljs-string">&quot;&quot;</span>,
      <span class="hljs-string">&quot;&#x4E07;&quot;</span>,
      <span class="hljs-string">&quot;&#x4EBF;&quot;</span>,
      <span class="hljs-string">&quot;&#x5146;&quot;</span>,
      <span class="hljs-string">&quot;&#x4EAC;&quot;</span>,
      <span class="hljs-string">&quot;&#x5793;&quot;</span>,
      <span class="hljs-string">&quot;&#x79ED;&quot;</span>,
      <span class="hljs-string">&quot;&#x7A70;&quot;</span>,
      <span class="hljs-string">&quot;&#x6C9F;&quot;</span>,
      <span class="hljs-string">&quot;&#x6DA7;&quot;</span>,
      <span class="hljs-string">&quot;&#x6B63;&quot;</span>,
      <span class="hljs-string">&quot;&#x8F7D;&quot;</span>,
    ],
    point: <span class="hljs-string">&quot;&#x70B9;&quot;</span>,
    uppercase: {
      <span class="hljs-comment">/* &#x7B80;&#x4F53;&#x5927;&#x5199;&#x6620;&#x5C04; */</span>
    },
  },
};
</code></pre>
<p>&#x4E3A;&#x4E86;&#x4F18;&#x5316;&#x6027;&#x80FD;&#xFF0C;&#x63D2;&#x4EF6;&#x8FD8;&#x9884;&#x8BA1;&#x7B97;&#x4E86;&#x53CD;&#x5411;&#x6620;&#x5C04;&#x8868;&#xFF1A;</p>
<pre><code class="lang-typescript"><span class="hljs-comment">// &#x9884;&#x8BA1;&#x7B97;&#x53CD;&#x5411;&#x6620;&#x5C04;&#x8868;&#x4EE5;&#x4F18;&#x5316; toNumber &#x51FD;&#x6570;&#x6027;&#x80FD;</span>
<span class="hljs-keyword">const</span> REVERSE_BASE_MAP: Record&lt;<span class="hljs-built_in">string</span>, <span class="hljs-built_in">string</span>&gt; = {};
<span class="hljs-keyword">for</span> (<span class="hljs-keyword">const</span> numKey <span class="hljs-keyword">in</span> NUMBER_MAPS.base) {
  NUMBER_MAPS.base[numKey].forEach((charVariant) =&gt; {
    REVERSE_BASE_MAP[charVariant] = numKey;
  });
}
</code></pre>
<h2 id="&#x529F;&#x80FD;&#x8BE6;&#x89E3;"><a name="&#x529F;&#x80FD;&#x8BE6;&#x89E3;" class="plugin-anchor" href="#&#x529F;&#x80FD;&#x8BE6;&#x89E3;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x529F;&#x80FD;&#x8BE6;&#x89E3;</h2>
<h3 id="1-&#x57FA;&#x7840;&#x6570;&#x5B57;&#x8F6C;&#x6362;"><a name="1-&#x57FA;&#x7840;&#x6570;&#x5B57;&#x8F6C;&#x6362;" class="plugin-anchor" href="#1-&#x57FA;&#x7840;&#x6570;&#x5B57;&#x8F6C;&#x6362;"><i class="fa fa-link" aria-hidden="true"></i></a>1. &#x57FA;&#x7840;&#x6570;&#x5B57;&#x8F6C;&#x6362;</h3>
<h4 id="&#x6570;&#x5B57;&#x8F6C;&#x4E2D;&#x6587;"><a name="&#x6570;&#x5B57;&#x8F6C;&#x4E2D;&#x6587;" class="plugin-anchor" href="#&#x6570;&#x5B57;&#x8F6C;&#x4E2D;&#x6587;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6570;&#x5B57;&#x8F6C;&#x4E2D;&#x6587;</h4>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> { toChinese } from <span class="hljs-string">&quot;@/uni_modules/nutpi-chinese-number-format&quot;</span>;

<span class="hljs-comment">// &#x57FA;&#x7840;&#x8F6C;&#x6362;</span>
<span class="hljs-keyword">const</span> result1 = toChinese(<span class="hljs-number">123</span>); <span class="hljs-comment">// &quot;&#x4E00;&#x4E8C;&#x4E09;&quot;</span>
<span class="hljs-keyword">const</span> result2 = toChinese(<span class="hljs-number">123.45</span>); <span class="hljs-comment">// &quot;&#x4E00;&#x4E8C;&#x4E09;&#x9EDE;&#x56DB;&#x4E94;&quot;</span>

<span class="hljs-comment">// &#x6307;&#x5B9A;&#x5730;&#x533A;</span>
<span class="hljs-keyword">const</span> result3 = toChinese(<span class="hljs-number">123</span>, <span class="hljs-string">&quot;zh-CN&quot;</span>); <span class="hljs-comment">// &quot;&#x4E00;&#x4E8C;&#x4E09;&quot;</span>
<span class="hljs-keyword">const</span> result4 = toChinese(<span class="hljs-number">123.45</span>, <span class="hljs-string">&quot;zh-CN&quot;</span>); <span class="hljs-comment">// &quot;&#x4E00;&#x4E8C;&#x4E09;&#x70B9;&#x56DB;&#x4E94;&quot;</span>
</code></pre>
<h4 id="&#x4E2D;&#x6587;&#x8F6C;&#x6570;&#x5B57;"><a name="&#x4E2D;&#x6587;&#x8F6C;&#x6570;&#x5B57;" class="plugin-anchor" href="#&#x4E2D;&#x6587;&#x8F6C;&#x6570;&#x5B57;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4E2D;&#x6587;&#x8F6C;&#x6570;&#x5B57;</h4>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> { toNumber } from <span class="hljs-string">&quot;@/uni_modules/nutpi-chinese-number-format&quot;</span>;

<span class="hljs-keyword">const</span> num1 = toNumber(<span class="hljs-string">&quot;&#x4E00;&#x4E8C;&#x4E09;&quot;</span>); <span class="hljs-comment">// 123</span>
<span class="hljs-keyword">const</span> num2 = toNumber(<span class="hljs-string">&quot;&#x4E00;&#x4E8C;&#x4E09;&#x9EDE;&#x56DB;&#x4E94;&quot;</span>); <span class="hljs-comment">// 123.45</span>
<span class="hljs-keyword">const</span> num3 = toNumber(<span class="hljs-string">&quot;&#x4E00;&#x842C;&#x4E8C;&#x5343;&#x4E09;&#x767E;&#x56DB;&#x5341;&#x4E94;&quot;</span>); <span class="hljs-comment">// 12345</span>
</code></pre>
<h3 id="2-&#x5E26;&#x5355;&#x4F4D;&#x7684;&#x4E2D;&#x6587;&#x8868;&#x793A;"><a name="2-&#x5E26;&#x5355;&#x4F4D;&#x7684;&#x4E2D;&#x6587;&#x8868;&#x793A;" class="plugin-anchor" href="#2-&#x5E26;&#x5355;&#x4F4D;&#x7684;&#x4E2D;&#x6587;&#x8868;&#x793A;"><i class="fa fa-link" aria-hidden="true"></i></a>2. &#x5E26;&#x5355;&#x4F4D;&#x7684;&#x4E2D;&#x6587;&#x8868;&#x793A;</h3>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> { toChineseWithUnits } from <span class="hljs-string">&quot;@/uni_modules/nutpi-chinese-number-format&quot;</span>;

<span class="hljs-comment">// &#x81EA;&#x52A8;&#x6DFB;&#x52A0;&#x5408;&#x9002;&#x7684;&#x5355;&#x4F4D;</span>
<span class="hljs-keyword">const</span> result1 = toChineseWithUnits(<span class="hljs-number">12345</span>); <span class="hljs-comment">// &quot;&#x4E00;&#x842C;&#x4E8C;&#x5343;&#x4E09;&#x767E;&#x56DB;&#x5341;&#x4E94;&quot;</span>
<span class="hljs-keyword">const</span> result2 = toChineseWithUnits(<span class="hljs-number">12345</span>, <span class="hljs-string">&quot;zh-CN&quot;</span>); <span class="hljs-comment">// &quot;&#x4E00;&#x4E07;&#x4E8C;&#x5343;&#x4E09;&#x767E;&#x56DB;&#x5341;&#x4E94;&quot;</span>
<span class="hljs-keyword">const</span> result3 = toChineseWithUnits(<span class="hljs-number">123456789</span>); <span class="hljs-comment">// &quot;&#x4E00;&#x5104;&#x4E8C;&#x5343;&#x4E09;&#x767E;&#x56DB;&#x5341;&#x4E94;&#x842C;&#x516D;&#x5343;&#x4E03;&#x767E;&#x516B;&#x5341;&#x4E5D;&quot;</span>
</code></pre>
<h3 id="3-&#x5927;&#x5199;&#x8F6C;&#x6362;"><a name="3-&#x5927;&#x5199;&#x8F6C;&#x6362;" class="plugin-anchor" href="#3-&#x5927;&#x5199;&#x8F6C;&#x6362;"><i class="fa fa-link" aria-hidden="true"></i></a>3. &#x5927;&#x5199;&#x8F6C;&#x6362;</h3>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> { toUpperCase } from <span class="hljs-string">&quot;@/uni_modules/nutpi-chinese-number-format&quot;</span>;

<span class="hljs-comment">// &#x8F6C;&#x6362;&#x4E3A;&#x5927;&#x5199;&#x4E2D;&#x6587;&#x6570;&#x5B57;</span>
<span class="hljs-keyword">const</span> result1 = toUpperCase(<span class="hljs-string">&quot;&#x4E00;&#x4E8C;&#x4E09;&quot;</span>); <span class="hljs-comment">// &quot;&#x58F9;&#x8CB3;&#x53C3;&quot;</span>
<span class="hljs-keyword">const</span> result2 = toUpperCase(<span class="hljs-string">&quot;&#x4E00;&#x4E8C;&#x4E09;&quot;</span>, <span class="hljs-string">&quot;zh-CN&quot;</span>); <span class="hljs-comment">// &quot;&#x58F9;&#x8D30;&#x53C1;&quot;</span>
</code></pre>
<h3 id="4-&#x5927;&#x6570;&#x5B57;&#x8FD1;&#x4F3C;&#x8868;&#x793A;"><a name="4-&#x5927;&#x6570;&#x5B57;&#x8FD1;&#x4F3C;&#x8868;&#x793A;" class="plugin-anchor" href="#4-&#x5927;&#x6570;&#x5B57;&#x8FD1;&#x4F3C;&#x8868;&#x793A;"><i class="fa fa-link" aria-hidden="true"></i></a>4. &#x5927;&#x6570;&#x5B57;&#x8FD1;&#x4F3C;&#x8868;&#x793A;</h3>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> { toChineseApproximate } from <span class="hljs-string">&quot;@/uni_modules/nutpi-chinese-number-format&quot;</span>;

<span class="hljs-comment">// &#x5927;&#x6570;&#x5B57;&#x7684;&#x8FD1;&#x4F3C;&#x8868;&#x793A;</span>
<span class="hljs-keyword">const</span> result1 = toChineseApproximate(<span class="hljs-number">123456789</span>); <span class="hljs-comment">// &quot;&#x4E00;&#x9EDE;&#x4E8C;&#x5104;&quot;</span>
<span class="hljs-keyword">const</span> result2 = toChineseApproximate(<span class="hljs-number">123456789</span>, {
  locale: <span class="hljs-string">&quot;zh-CN&quot;</span>,
  precision: <span class="hljs-number">2</span>,
}); <span class="hljs-comment">// &quot;&#x4E00;&#x70B9;&#x4E8C;&#x4E09;&#x4EBF;&quot;</span>
</code></pre>
<h3 id="5-&#x6708;&#x4EFD;&#x8F6C;&#x6362;"><a name="5-&#x6708;&#x4EFD;&#x8F6C;&#x6362;" class="plugin-anchor" href="#5-&#x6708;&#x4EFD;&#x8F6C;&#x6362;"><i class="fa fa-link" aria-hidden="true"></i></a>5. &#x6708;&#x4EFD;&#x8F6C;&#x6362;</h3>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> { toChineseMonth } from <span class="hljs-string">&quot;@/uni_modules/nutpi-chinese-number-format&quot;</span>;

<span class="hljs-comment">// &#x7B80;&#x5355;&#x683C;&#x5F0F;</span>
<span class="hljs-keyword">const</span> month1 = toChineseMonth(<span class="hljs-number">10</span>); <span class="hljs-comment">// &quot;&#x5341;&#x6708;&quot;</span>
<span class="hljs-keyword">const</span> month2 = toChineseMonth(<span class="hljs-number">11</span>); <span class="hljs-comment">// &quot;&#x5341;&#x4E00;&#x6708;&quot;</span>

<span class="hljs-comment">// &#x4F20;&#x7EDF;&#x683C;&#x5F0F;</span>
<span class="hljs-keyword">const</span> month3 = toChineseMonth(<span class="hljs-number">1</span>, { format: <span class="hljs-string">&quot;traditional&quot;</span> }); <span class="hljs-comment">// &quot;&#x6B63;&#x6708;&quot;</span>
<span class="hljs-keyword">const</span> month4 = toChineseMonth(<span class="hljs-number">12</span>, {
  format: <span class="hljs-string">&quot;traditional&quot;</span>,
  locale: <span class="hljs-string">&quot;zh-CN&quot;</span>,
}); <span class="hljs-comment">// &quot;&#x814A;&#x6708;&quot;</span>
</code></pre>
<h2 id="&#x5B9E;&#x9645;&#x5E94;&#x7528;&#x573A;&#x666F;"><a name="&#x5B9E;&#x9645;&#x5E94;&#x7528;&#x573A;&#x666F;" class="plugin-anchor" href="#&#x5B9E;&#x9645;&#x5E94;&#x7528;&#x573A;&#x666F;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5B9E;&#x9645;&#x5E94;&#x7528;&#x573A;&#x666F;</h2>
<h3 id="1-&#x7535;&#x5546;&#x5E94;&#x7528;&#x4E2D;&#x7684;&#x4EF7;&#x683C;&#x663E;&#x793A;"><a name="1-&#x7535;&#x5546;&#x5E94;&#x7528;&#x4E2D;&#x7684;&#x4EF7;&#x683C;&#x663E;&#x793A;" class="plugin-anchor" href="#1-&#x7535;&#x5546;&#x5E94;&#x7528;&#x4E2D;&#x7684;&#x4EF7;&#x683C;&#x663E;&#x793A;"><i class="fa fa-link" aria-hidden="true"></i></a>1. &#x7535;&#x5546;&#x5E94;&#x7528;&#x4E2D;&#x7684;&#x4EF7;&#x683C;&#x663E;&#x793A;</h3>
<pre><code class="lang-typescript"><span class="hljs-comment">// &#x5728;&#x5546;&#x54C1;&#x8BE6;&#x60C5;&#x9875;&#x663E;&#x793A;&#x4E2D;&#x6587;&#x4EF7;&#x683C;</span>
<span class="hljs-keyword">const</span> price = <span class="hljs-number">12888</span>;
<span class="hljs-keyword">const</span> chinesePrice = toChineseWithUnits(price, <span class="hljs-string">&quot;zh-CN&quot;</span>); <span class="hljs-comment">// &quot;&#x4E00;&#x4E07;&#x4E8C;&#x5343;&#x516B;&#x767E;&#x516B;&#x5341;&#x516B;&quot;</span>
</code></pre>
<h3 id="2-&#x8D22;&#x52A1;&#x5E94;&#x7528;&#x4E2D;&#x7684;&#x91D1;&#x989D;&#x5927;&#x5199;"><a name="2-&#x8D22;&#x52A1;&#x5E94;&#x7528;&#x4E2D;&#x7684;&#x91D1;&#x989D;&#x5927;&#x5199;" class="plugin-anchor" href="#2-&#x8D22;&#x52A1;&#x5E94;&#x7528;&#x4E2D;&#x7684;&#x91D1;&#x989D;&#x5927;&#x5199;"><i class="fa fa-link" aria-hidden="true"></i></a>2. &#x8D22;&#x52A1;&#x5E94;&#x7528;&#x4E2D;&#x7684;&#x91D1;&#x989D;&#x5927;&#x5199;</h3>
<pre><code class="lang-typescript"><span class="hljs-comment">// &#x53D1;&#x7968;&#x6216;&#x6536;&#x636E;&#x4E2D;&#x7684;&#x91D1;&#x989D;&#x5927;&#x5199;</span>
<span class="hljs-keyword">const</span> amount = <span class="hljs-string">&quot;&#x4E00;&#x4E07;&#x4E8C;&#x5343;&#x4E09;&#x767E;&#x56DB;&#x5341;&#x4E94;&quot;</span>;
<span class="hljs-keyword">const</span> uppercaseAmount = toUpperCase(amount, <span class="hljs-string">&quot;zh-CN&quot;</span>); <span class="hljs-comment">// &quot;&#x58F9;&#x4E07;&#x8D30;&#x4EDF;&#x53C1;&#x4F70;&#x8086;&#x62FE;&#x4F0D;&quot;</span>
</code></pre>
<h3 id="3-&#x65E5;&#x671F;&#x9009;&#x62E9;&#x5668;&#x4E2D;&#x7684;&#x6708;&#x4EFD;&#x663E;&#x793A;"><a name="3-&#x65E5;&#x671F;&#x9009;&#x62E9;&#x5668;&#x4E2D;&#x7684;&#x6708;&#x4EFD;&#x663E;&#x793A;" class="plugin-anchor" href="#3-&#x65E5;&#x671F;&#x9009;&#x62E9;&#x5668;&#x4E2D;&#x7684;&#x6708;&#x4EFD;&#x663E;&#x793A;"><i class="fa fa-link" aria-hidden="true"></i></a>3. &#x65E5;&#x671F;&#x9009;&#x62E9;&#x5668;&#x4E2D;&#x7684;&#x6708;&#x4EFD;&#x663E;&#x793A;</h3>
<pre><code class="lang-typescript"><span class="hljs-comment">// &#x4F20;&#x7EDF;&#x65E5;&#x5386;&#x4E2D;&#x7684;&#x6708;&#x4EFD;&#x663E;&#x793A;</span>
<span class="hljs-keyword">const</span> months = [];
<span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> i = <span class="hljs-number">1</span>; i &lt;= <span class="hljs-number">12</span>; i++) {
  months.push(toChineseMonth(i, { format: <span class="hljs-string">&quot;traditional&quot;</span>, locale: <span class="hljs-string">&quot;zh-CN&quot;</span> }));
}
<span class="hljs-comment">// [&quot;&#x6B63;&#x6708;&quot;, &quot;&#x4E8C;&#x6708;&quot;, &quot;&#x4E09;&#x6708;&quot;, ..., &quot;&#x814A;&#x6708;&quot;]</span>
</code></pre>
<h3 id="4-&#x6570;&#x636E;&#x7EDF;&#x8BA1;&#x4E2D;&#x7684;&#x5927;&#x6570;&#x5B57;&#x5C55;&#x793A;"><a name="4-&#x6570;&#x636E;&#x7EDF;&#x8BA1;&#x4E2D;&#x7684;&#x5927;&#x6570;&#x5B57;&#x5C55;&#x793A;" class="plugin-anchor" href="#4-&#x6570;&#x636E;&#x7EDF;&#x8BA1;&#x4E2D;&#x7684;&#x5927;&#x6570;&#x5B57;&#x5C55;&#x793A;"><i class="fa fa-link" aria-hidden="true"></i></a>4. &#x6570;&#x636E;&#x7EDF;&#x8BA1;&#x4E2D;&#x7684;&#x5927;&#x6570;&#x5B57;&#x5C55;&#x793A;</h3>
<pre><code class="lang-typescript"><span class="hljs-comment">// &#x7528;&#x6237;&#x91CF;&#x7EDF;&#x8BA1;&#x7684;&#x53CB;&#x597D;&#x663E;&#x793A;</span>
<span class="hljs-keyword">const</span> userCount = <span class="hljs-number">1234567</span>;
<span class="hljs-keyword">const</span> friendlyCount = toChineseApproximate(userCount, {
  locale: <span class="hljs-string">&quot;zh-CN&quot;</span>,
  precision: <span class="hljs-number">1</span>,
}); <span class="hljs-comment">// &quot;&#x4E00;&#x70B9;&#x4E8C;&#x4E07;&quot;</span>
</code></pre>
<h2 id="&#x5728;-vue-&#x7EC4;&#x4EF6;&#x4E2D;&#x7684;&#x5B8C;&#x6574;&#x4F7F;&#x7528;&#x793A;&#x4F8B;"><a name="&#x5728;-vue-&#x7EC4;&#x4EF6;&#x4E2D;&#x7684;&#x5B8C;&#x6574;&#x4F7F;&#x7528;&#x793A;&#x4F8B;" class="plugin-anchor" href="#&#x5728;-vue-&#x7EC4;&#x4EF6;&#x4E2D;&#x7684;&#x5B8C;&#x6574;&#x4F7F;&#x7528;&#x793A;&#x4F8B;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5728; Vue &#x7EC4;&#x4EF6;&#x4E2D;&#x7684;&#x5B8C;&#x6574;&#x4F7F;&#x7528;&#x793A;&#x4F8B;</h2>
<pre><code class="lang-vue">&lt;template&gt;
  &lt;view class=&quot;number-demo&quot;&gt;
    &lt;view class=&quot;section&quot;&gt;
      &lt;text class=&quot;title&quot;&gt;&#x57FA;&#x7840;&#x8F6C;&#x6362;&lt;/text&gt;
      &lt;text&gt;&#x6570;&#x5B57; {{ originalNumber }} &#x8F6C;&#x4E2D;&#x6587;&#xFF1A;{{ chineseNumber }}&lt;/text&gt;
      &lt;text&gt;&#x4E2D;&#x6587;&#x8F6C;&#x6570;&#x5B57;&#xFF1A;{{ convertedNumber }}&lt;/text&gt;
    &lt;/view&gt;

    &lt;view class=&quot;section&quot;&gt;
      &lt;text class=&quot;title&quot;&gt;&#x5E26;&#x5355;&#x4F4D;&#x8F6C;&#x6362;&lt;/text&gt;
      &lt;text&gt;{{ largeNumber }} &#x2192; {{ chineseWithUnits }}&lt;/text&gt;
    &lt;/view&gt;

    &lt;view class=&quot;section&quot;&gt;
      &lt;text class=&quot;title&quot;&gt;&#x5927;&#x5199;&#x8F6C;&#x6362;&lt;/text&gt;
      &lt;text&gt;{{ chineseText }} &#x2192; {{ uppercaseText }}&lt;/text&gt;
    &lt;/view&gt;

    &lt;view class=&quot;section&quot;&gt;
      &lt;text class=&quot;title&quot;&gt;&#x6708;&#x4EFD;&#x8F6C;&#x6362;&lt;/text&gt;
      &lt;text&gt;{{ currentMonth }}&#x6708; &#x2192; {{ chineseMonth }}&lt;/text&gt;
      &lt;text&gt;&#x4F20;&#x7EDF;&#x683C;&#x5F0F;&#xFF1A;{{ traditionalMonth }}&lt;/text&gt;
    &lt;/view&gt;
  &lt;/view&gt;
&lt;/template&gt;

&lt;script setup lang=&quot;ts&quot;&gt;
import {
  toChinese,
  toChineseWithUnits,
  toNumber,
  toUpperCase,
  toChineseApproximate,
  toChineseMonth,
  type Locales,
} from &quot;@/uni_modules/nutpi-chinese-number-format&quot;;

// &#x54CD;&#x5E94;&#x5F0F;&#x6570;&#x636E;
const originalNumber = ref(12345);
const largeNumber = ref(123456789);
const chineseText = ref(&quot;&#x4E00;&#x4E8C;&#x4E09;&#x56DB;&#x4E94;&quot;);
const currentMonth = ref(10);

// &#x8BA1;&#x7B97;&#x5C5E;&#x6027;
const chineseNumber = computed(() =&gt; toChinese(originalNumber.value, &quot;zh-CN&quot;));

const convertedNumber = computed(() =&gt; toNumber(&quot;&#x4E00;&#x4E8C;&#x4E09;&#x56DB;&#x4E94;&quot;));

const chineseWithUnits = computed(() =&gt;
  toChineseWithUnits(largeNumber.value, &quot;zh-CN&quot;)
);

const uppercaseText = computed(() =&gt; toUpperCase(chineseText.value, &quot;zh-CN&quot;));

const chineseMonth = computed(() =&gt; toChineseMonth(currentMonth.value));

const traditionalMonth = computed(() =&gt;
  toChineseMonth(currentMonth.value, {
    format: &quot;traditional&quot;,
    locale: &quot;zh-CN&quot;,
  })
);
&lt;/script&gt;
</code></pre>
<h2 id="&#x6027;&#x80FD;&#x4F18;&#x5316;"><a name="&#x6027;&#x80FD;&#x4F18;&#x5316;" class="plugin-anchor" href="#&#x6027;&#x80FD;&#x4F18;&#x5316;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6027;&#x80FD;&#x4F18;&#x5316;</h2>
<h3 id="1-&#x9884;&#x8BA1;&#x7B97;&#x6620;&#x5C04;&#x8868;"><a name="1-&#x9884;&#x8BA1;&#x7B97;&#x6620;&#x5C04;&#x8868;" class="plugin-anchor" href="#1-&#x9884;&#x8BA1;&#x7B97;&#x6620;&#x5C04;&#x8868;"><i class="fa fa-link" aria-hidden="true"></i></a>1. &#x9884;&#x8BA1;&#x7B97;&#x6620;&#x5C04;&#x8868;</h3>
<p>&#x63D2;&#x4EF6;&#x5728;&#x521D;&#x59CB;&#x5316;&#x65F6;&#x9884;&#x8BA1;&#x7B97;&#x4E86;&#x53CD;&#x5411;&#x6620;&#x5C04;&#x8868;&#xFF0C;&#x907F;&#x514D;&#x4E86;&#x8FD0;&#x884C;&#x65F6;&#x7684;&#x91CD;&#x590D;&#x8BA1;&#x7B97;&#xFF1A;</p>
<pre><code class="lang-typescript"><span class="hljs-comment">// &#x9884;&#x8BA1;&#x7B97;&#x53CD;&#x5411;&#x6620;&#x5C04;&#x8868;&#xFF0C;&#x63D0;&#x5347; toNumber &#x51FD;&#x6570;&#x6027;&#x80FD;</span>
<span class="hljs-keyword">const</span> REVERSE_BASE_MAP: Record&lt;<span class="hljs-built_in">string</span>, <span class="hljs-built_in">string</span>&gt; = {};
<span class="hljs-keyword">for</span> (<span class="hljs-keyword">const</span> numKey <span class="hljs-keyword">in</span> NUMBER_MAPS.base) {
  NUMBER_MAPS.base[numKey].forEach((charVariant) =&gt; {
    REVERSE_BASE_MAP[charVariant] = numKey;
  });
}
</code></pre>
<h3 id="2-&#x9AD8;&#x6548;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#x5904;&#x7406;"><a name="2-&#x9AD8;&#x6548;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#x5904;&#x7406;" class="plugin-anchor" href="#2-&#x9AD8;&#x6548;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#x5904;&#x7406;"><i class="fa fa-link" aria-hidden="true"></i></a>2. &#x9AD8;&#x6548;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#x5904;&#x7406;</h3>
<p>&#x5728;&#x5904;&#x7406;&#x5927;&#x6570;&#x5B57;&#x65F6;&#xFF0C;&#x63D2;&#x4EF6;&#x91C7;&#x7528;&#x4E86;&#x5206;&#x7EC4;&#x5904;&#x7406;&#x7684;&#x65B9;&#x5F0F;&#xFF0C;&#x63D0;&#x9AD8;&#x4E86;&#x8F6C;&#x6362;&#x6548;&#x7387;&#xFF1A;</p>
<pre><code class="lang-typescript"><span class="hljs-comment">// &#x6309;4&#x4F4D;&#x8FDB;&#x884C;&#x5206;&#x7EC4;&#x5904;&#x7406;&#xFF0C;&#x63D0;&#x9AD8;&#x5927;&#x6570;&#x5B57;&#x5904;&#x7406;&#x6548;&#x7387;</span>
<span class="hljs-keyword">const</span> groups = numStr
  .split(<span class="hljs-string">&quot;&quot;</span>)
  .reverse()
  .reduce((acc: <span class="hljs-built_in">string</span>[][], digit: <span class="hljs-built_in">string</span>, i: <span class="hljs-built_in">number</span>) =&gt; {
    <span class="hljs-keyword">const</span> groupIndex = <span class="hljs-built_in">Math</span>.floor(i / <span class="hljs-number">4</span>);
    <span class="hljs-keyword">if</span> (!acc[groupIndex]) acc[groupIndex] = [];
    acc[groupIndex].unshift(digit);
    <span class="hljs-keyword">return</span> acc;
  }, []);
</code></pre>
<h2 id="&#x9519;&#x8BEF;&#x5904;&#x7406;&#x548C;&#x8FB9;&#x754C;&#x60C5;&#x51B5;"><a name="&#x9519;&#x8BEF;&#x5904;&#x7406;&#x548C;&#x8FB9;&#x754C;&#x60C5;&#x51B5;" class="plugin-anchor" href="#&#x9519;&#x8BEF;&#x5904;&#x7406;&#x548C;&#x8FB9;&#x754C;&#x60C5;&#x51B5;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x9519;&#x8BEF;&#x5904;&#x7406;&#x548C;&#x8FB9;&#x754C;&#x60C5;&#x51B5;</h2>
<h3 id="1-&#x8F93;&#x5165;&#x9A8C;&#x8BC1;"><a name="1-&#x8F93;&#x5165;&#x9A8C;&#x8BC1;" class="plugin-anchor" href="#1-&#x8F93;&#x5165;&#x9A8C;&#x8BC1;"><i class="fa fa-link" aria-hidden="true"></i></a>1. &#x8F93;&#x5165;&#x9A8C;&#x8BC1;</h3>
<pre><code class="lang-typescript"><span class="hljs-comment">// toNumber &#x51FD;&#x6570;&#x7684;&#x9519;&#x8BEF;&#x5904;&#x7406;</span>
<span class="hljs-keyword">export</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">toNumber</span>(<span class="hljs-params">str: <span class="hljs-built_in">string</span></span>): <span class="hljs-title">number</span> </span>{
  <span class="hljs-keyword">let</span> numberStr = <span class="hljs-string">&quot;&quot;</span>;
  <span class="hljs-keyword">let</span> hasInvalidChar = <span class="hljs-literal">false</span>;

  <span class="hljs-keyword">for</span> (<span class="hljs-keyword">const</span> char of str) {
    <span class="hljs-keyword">const</span> digit = REVERSE_BASE_MAP[char];
    <span class="hljs-keyword">if</span> (digit !== <span class="hljs-literal">undefined</span>) {
      numberStr += digit;
    } <span class="hljs-keyword">else</span> {
      hasInvalidChar = <span class="hljs-literal">true</span>;
      <span class="hljs-keyword">break</span>;
    }
  }

  <span class="hljs-keyword">if</span> (hasInvalidChar || numberStr.length === <span class="hljs-number">0</span>) {
    <span class="hljs-keyword">return</span> <span class="hljs-literal">NaN</span>; <span class="hljs-comment">// &#x8F6C;&#x6362;&#x5931;&#x8D25;&#x65F6;&#x8FD4;&#x56DE; NaN</span>
  }

  <span class="hljs-comment">// &#x5904;&#x7406;&#x591A;&#x4E2A;&#x5C0F;&#x6570;&#x70B9;&#x7684;&#x60C5;&#x51B5;</span>
  <span class="hljs-keyword">const</span> parts = numberStr.split(<span class="hljs-string">&quot;.&quot;</span>);
  <span class="hljs-keyword">if</span> (parts.length &gt; <span class="hljs-number">1</span>) {
    numberStr = parts[<span class="hljs-number">0</span>] + <span class="hljs-string">&quot;.&quot;</span> + parts.slice(<span class="hljs-number">1</span>).join(<span class="hljs-string">&quot;&quot;</span>);
  }

  <span class="hljs-keyword">return</span> <span class="hljs-built_in">Number</span>(numberStr);
}
</code></pre>
<h3 id="2-&#x6708;&#x4EFD;&#x9A8C;&#x8BC1;"><a name="2-&#x6708;&#x4EFD;&#x9A8C;&#x8BC1;" class="plugin-anchor" href="#2-&#x6708;&#x4EFD;&#x9A8C;&#x8BC1;"><i class="fa fa-link" aria-hidden="true"></i></a>2. &#x6708;&#x4EFD;&#x9A8C;&#x8BC1;</h3>
<pre><code class="lang-typescript"><span class="hljs-comment">// toChineseMonth &#x51FD;&#x6570;&#x7684;&#x8FB9;&#x754C;&#x68C0;&#x67E5;</span>
<span class="hljs-keyword">export</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">toChineseMonth</span>(<span class="hljs-params">
  month: <span class="hljs-built_in">number</span>,
  options: MonthOptions = {}
</span>): <span class="hljs-title">string</span> </span>{
  <span class="hljs-comment">// &#x68C0;&#x67E5;&#x6708;&#x4EFD;&#x662F;&#x5426;&#x5728;1&#x5230;12&#x4E4B;&#x95F4;&#x4E14;&#x4E3A;&#x6574;&#x6570;</span>
  <span class="hljs-keyword">if</span> (month &lt; <span class="hljs-number">1</span> || month &gt; <span class="hljs-number">12</span> || !<span class="hljs-built_in">Number</span>.isInteger(month)) {
    <span class="hljs-keyword">return</span> <span class="hljs-string">&quot;&quot;</span>; <span class="hljs-comment">// &#x65E0;&#x6548;&#x6708;&#x4EFD;&#x8FD4;&#x56DE;&#x7A7A;&#x5B57;&#x7B26;&#x4E32;</span>
  }
  <span class="hljs-comment">// ... &#x5176;&#x4ED6;&#x5904;&#x7406;&#x903B;&#x8F91;</span>
}
</code></pre>
<h2 id="&#x5B89;&#x88C5;&#x548C;&#x914D;&#x7F6E;"><a name="&#x5B89;&#x88C5;&#x548C;&#x914D;&#x7F6E;" class="plugin-anchor" href="#&#x5B89;&#x88C5;&#x548C;&#x914D;&#x7F6E;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5B89;&#x88C5;&#x548C;&#x914D;&#x7F6E;</h2>
<h3 id="1-&#x901A;&#x8FC7;-unimodules-&#x5B89;&#x88C5;"><a name="1-&#x901A;&#x8FC7;-unimodules-&#x5B89;&#x88C5;" class="plugin-anchor" href="#1-&#x901A;&#x8FC7;-unimodules-&#x5B89;&#x88C5;"><i class="fa fa-link" aria-hidden="true"></i></a>1. &#x901A;&#x8FC7; uni_modules &#x5B89;&#x88C5;</h3>
<ol>
<li>&#x5C06; <code>nutpi-chinese-number-format</code> &#x6587;&#x4EF6;&#x5939;&#x590D;&#x5236;&#x5230;&#x9879;&#x76EE;&#x7684; <code>uni_modules</code> &#x76EE;&#x5F55;&#x4E0B;</li>
<li>&#x5728; HBuilderX &#x4E2D;&#x91CD;&#x65B0;&#x7F16;&#x8BD1;&#x9879;&#x76EE;</li>
</ol>
<h3 id="2-&#x73AF;&#x5883;&#x8981;&#x6C42;"><a name="2-&#x73AF;&#x5883;&#x8981;&#x6C42;" class="plugin-anchor" href="#2-&#x73AF;&#x5883;&#x8981;&#x6C42;"><i class="fa fa-link" aria-hidden="true"></i></a>2. &#x73AF;&#x5883;&#x8981;&#x6C42;</h3>
<ul>
<li><strong>HBuilderX</strong>: 3.6.8 &#x6216;&#x66F4;&#x9AD8;&#x7248;&#x672C;</li>
<li><strong>uni-app</strong>: &#x652F;&#x6301; Vue 2 &#x548C; Vue 3</li>
<li><strong>uni-app x</strong>: &#x5B8C;&#x5168;&#x652F;&#x6301;</li>
<li><strong>&#x5E73;&#x53F0;&#x652F;&#x6301;</strong>: App&#xFF08;Android/iOS/Harmony&#xFF09;&#x3001;H5&#x3001;&#x5C0F;&#x7A0B;&#x5E8F;&#x7B49;</li>
</ul>
<h3 id="3-typescript-&#x914D;&#x7F6E;"><a name="3-typescript-&#x914D;&#x7F6E;" class="plugin-anchor" href="#3-typescript-&#x914D;&#x7F6E;"><i class="fa fa-link" aria-hidden="true"></i></a>3. TypeScript &#x914D;&#x7F6E;</h3>
<p>&#x5982;&#x679C;&#x4F60;&#x7684;&#x9879;&#x76EE;&#x4F7F;&#x7528; TypeScript&#xFF0C;&#x63D2;&#x4EF6;&#x63D0;&#x4F9B;&#x4E86;&#x5B8C;&#x6574;&#x7684;&#x7C7B;&#x578B;&#x5B9A;&#x4E49;&#xFF1A;</p>
<pre><code class="lang-typescript"><span class="hljs-comment">// &#x7C7B;&#x578B;&#x5BFC;&#x5165;</span>
<span class="hljs-keyword">import</span> <span class="hljs-keyword">type</span> {
  Locales,
  Options,
  MonthOptions,
} from <span class="hljs-string">&quot;@/uni_modules/nutpi-chinese-number-format&quot;</span>;

<span class="hljs-comment">// &#x4F7F;&#x7528;&#x7C7B;&#x578B;</span>
<span class="hljs-keyword">const</span> locale: Locales = <span class="hljs-string">&quot;zh-CN&quot;</span>;
<span class="hljs-keyword">const</span> options: Options = {
  locale: <span class="hljs-string">&quot;zh-CN&quot;</span>,
  precision: <span class="hljs-number">2</span>,
};
</code></pre>
<h2 id="&#x6700;&#x4F73;&#x5B9E;&#x8DF5;"><a name="&#x6700;&#x4F73;&#x5B9E;&#x8DF5;" class="plugin-anchor" href="#&#x6700;&#x4F73;&#x5B9E;&#x8DF5;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6700;&#x4F73;&#x5B9E;&#x8DF5;</h2>
<h3 id="1-&#x5730;&#x533A;&#x8BBE;&#x7F6E;&#x9009;&#x62E9;"><a name="1-&#x5730;&#x533A;&#x8BBE;&#x7F6E;&#x9009;&#x62E9;" class="plugin-anchor" href="#1-&#x5730;&#x533A;&#x8BBE;&#x7F6E;&#x9009;&#x62E9;"><i class="fa fa-link" aria-hidden="true"></i></a>1. &#x5730;&#x533A;&#x8BBE;&#x7F6E;&#x9009;&#x62E9;</h3>
<pre><code class="lang-typescript"><span class="hljs-comment">// &#x6839;&#x636E;&#x7528;&#x6237;&#x8BBE;&#x5907;&#x8BED;&#x8A00;&#x81EA;&#x52A8;&#x9009;&#x62E9;&#x5730;&#x533A;</span>
<span class="hljs-keyword">const</span> getLocale = (): Locales =&gt; {
  <span class="hljs-keyword">const</span> systemLocale = uni.getSystemInfoSync().language;
  <span class="hljs-keyword">return</span> systemLocale.includes(<span class="hljs-string">&quot;TW&quot;</span>) || systemLocale.includes(<span class="hljs-string">&quot;HK&quot;</span>)
    ? <span class="hljs-string">&quot;zh-TW&quot;</span>
    : <span class="hljs-string">&quot;zh-CN&quot;</span>;
};

<span class="hljs-keyword">const</span> userLocale = getLocale();
<span class="hljs-keyword">const</span> result = toChinese(<span class="hljs-number">123</span>, userLocale);
</code></pre>
<h3 id="2-&#x9519;&#x8BEF;&#x5904;&#x7406;"><a name="2-&#x9519;&#x8BEF;&#x5904;&#x7406;" class="plugin-anchor" href="#2-&#x9519;&#x8BEF;&#x5904;&#x7406;"><i class="fa fa-link" aria-hidden="true"></i></a>2. &#x9519;&#x8BEF;&#x5904;&#x7406;</h3>
<pre><code class="lang-typescript"><span class="hljs-comment">// &#x5B89;&#x5168;&#x7684;&#x6570;&#x5B57;&#x8F6C;&#x6362;</span>
<span class="hljs-keyword">const</span> safeToNumber = (str: <span class="hljs-built_in">string</span>): <span class="hljs-built_in">number</span> | <span class="hljs-literal">null</span> =&gt; {
  <span class="hljs-keyword">const</span> result = toNumber(str);
  <span class="hljs-keyword">return</span> <span class="hljs-built_in">isNaN</span>(result) ? <span class="hljs-literal">null</span> : result;
};

<span class="hljs-comment">// &#x4F7F;&#x7528;&#x793A;&#x4F8B;</span>
<span class="hljs-keyword">const</span> userInput = <span class="hljs-string">&quot;&#x4E00;&#x4E8C;&#x4E09;&quot;</span>;
<span class="hljs-keyword">const</span> <span class="hljs-built_in">number</span> = safeToNumber(userInput);
<span class="hljs-keyword">if</span> (<span class="hljs-built_in">number</span> !== <span class="hljs-literal">null</span>) {
  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`&#x8F6C;&#x6362;&#x6210;&#x529F;: <span class="hljs-subst">${number}</span>`</span>);
} <span class="hljs-keyword">else</span> {
  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">&quot;&#x8F6C;&#x6362;&#x5931;&#x8D25;&#xFF0C;&#x8BF7;&#x68C0;&#x67E5;&#x8F93;&#x5165;&#x683C;&#x5F0F;&quot;</span>);
}
</code></pre>
<h3 id="3-&#x6027;&#x80FD;&#x4F18;&#x5316;&#x5EFA;&#x8BAE;"><a name="3-&#x6027;&#x80FD;&#x4F18;&#x5316;&#x5EFA;&#x8BAE;" class="plugin-anchor" href="#3-&#x6027;&#x80FD;&#x4F18;&#x5316;&#x5EFA;&#x8BAE;"><i class="fa fa-link" aria-hidden="true"></i></a>3. &#x6027;&#x80FD;&#x4F18;&#x5316;&#x5EFA;&#x8BAE;</h3>
<pre><code class="lang-typescript"><span class="hljs-comment">// &#x5BF9;&#x4E8E;&#x9891;&#x7E41;&#x8C03;&#x7528;&#x7684;&#x573A;&#x666F;&#xFF0C;&#x53EF;&#x4EE5;&#x7F13;&#x5B58;&#x7ED3;&#x679C;</span>
<span class="hljs-keyword">const</span> numberCache = <span class="hljs-keyword">new</span> Map&lt;<span class="hljs-built_in">string</span>, <span class="hljs-built_in">string</span>&gt;();

<span class="hljs-keyword">const</span> cachedToChinese = (num: <span class="hljs-built_in">number</span>, locale: Locales = <span class="hljs-string">&quot;zh-CN&quot;</span>): <span class="hljs-built_in">string</span> =&gt; {
  <span class="hljs-keyword">const</span> key = <span class="hljs-string">`<span class="hljs-subst">${num}</span>_<span class="hljs-subst">${locale}</span>`</span>;
  <span class="hljs-keyword">if</span> (numberCache.has(key)) {
    <span class="hljs-keyword">return</span> numberCache.get(key)!;
  }

  <span class="hljs-keyword">const</span> result = toChinese(num, locale);
  numberCache.set(key, result);
  <span class="hljs-keyword">return</span> result;
};
</code></pre>
<h2 id="&#x603B;&#x7ED3;"><a name="&#x603B;&#x7ED3;" class="plugin-anchor" href="#&#x603B;&#x7ED3;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x603B;&#x7ED3;</h2>
<p><code>nutpi-chinese-number-format</code> &#x662F;&#x4E00;&#x4E2A;&#x529F;&#x80FD;&#x5168;&#x9762;&#x3001;&#x6027;&#x80FD;&#x4F18;&#x79C0;&#x7684;&#x4E2D;&#x6587;&#x6570;&#x5B57;&#x683C;&#x5F0F;&#x5316;&#x63D2;&#x4EF6;&#x3002;&#x5B83;&#x4E0D;&#x4EC5;&#x63D0;&#x4F9B;&#x4E86;&#x4E30;&#x5BCC;&#x7684;&#x8F6C;&#x6362;&#x529F;&#x80FD;&#xFF0C;&#x8FD8;&#x5177;&#x5907;&#x4EE5;&#x4E0B;&#x4F18;&#x52BF;&#xFF1A;</p>
<ol>
<li><strong>&#x6280;&#x672F;&#x5148;&#x8FDB;</strong>&#xFF1A;&#x57FA;&#x4E8E; UTS &#x6280;&#x672F;&#xFF0C;&#x6027;&#x80FD;&#x63A5;&#x8FD1;&#x539F;&#x751F;</li>
<li><strong>&#x529F;&#x80FD;&#x5B8C;&#x6574;</strong>&#xFF1A;&#x6DB5;&#x76D6;&#x4E86;&#x4E2D;&#x6587;&#x6570;&#x5B57;&#x5904;&#x7406;&#x7684;&#x5404;&#x79CD;&#x573A;&#x666F;</li>
<li><strong>&#x7C7B;&#x578B;&#x5B89;&#x5168;</strong>&#xFF1A;&#x5B8C;&#x6574;&#x7684; TypeScript &#x652F;&#x6301;</li>
<li><strong>&#x8DE8;&#x5E73;&#x53F0;</strong>&#xFF1A;&#x652F;&#x6301; uni-app &#x751F;&#x6001;&#x7684;&#x6240;&#x6709;&#x5E73;&#x53F0;</li>
<li><strong>&#x6613;&#x4E8E;&#x4F7F;&#x7528;</strong>&#xFF1A;&#x7B80;&#x6D01;&#x7684; API &#x8BBE;&#x8BA1;&#xFF0C;&#x4E0A;&#x624B;&#x5BB9;&#x6613;</li>
<li><strong>&#x6027;&#x80FD;&#x4F18;&#x5316;</strong>&#xFF1A;&#x9884;&#x8BA1;&#x7B97;&#x6620;&#x5C04;&#x8868;&#xFF0C;&#x9AD8;&#x6548;&#x7684;&#x7B97;&#x6CD5;&#x5B9E;&#x73B0;</li>
</ol>
<p>&#x65E0;&#x8BBA;&#x662F;&#x5F00;&#x53D1;&#x7535;&#x5546;&#x5E94;&#x7528;&#x3001;&#x8D22;&#x52A1;&#x7CFB;&#x7EDF;&#xFF0C;&#x8FD8;&#x662F;&#x9700;&#x8981;&#x4E2D;&#x6587;&#x672C;&#x5730;&#x5316;&#x7684;&#x5176;&#x4ED6;&#x5E94;&#x7528;&#xFF0C;&#x8FD9;&#x4E2A;&#x63D2;&#x4EF6;&#x90FD;&#x80FD;&#x4E3A;&#x4F60;&#x63D0;&#x4F9B;&#x53EF;&#x9760;&#x7684;&#x4E2D;&#x6587;&#x6570;&#x5B57;&#x683C;&#x5F0F;&#x5316;&#x89E3;&#x51B3;&#x65B9;&#x6848;&#x3002;</p>
<h2 id="&#x8054;&#x7CFB;&#x65B9;&#x5F0F;"><a name="&#x8054;&#x7CFB;&#x65B9;&#x5F0F;" class="plugin-anchor" href="#&#x8054;&#x7CFB;&#x65B9;&#x5F0F;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x8054;&#x7CFB;&#x65B9;&#x5F0F;</h2>
<p>&#x5982;&#x6709;&#x95EE;&#x9898;&#x6216;&#x5EFA;&#x8BAE;&#xFF0C;&#x8BF7;&#x901A;&#x8FC7;&#x4EE5;&#x4E0B;&#x65B9;&#x5F0F;&#x8054;&#x7CFB;&#xFF1A;</p>
<ul>
<li><strong>&#x4F5C;&#x8005;</strong>&#xFF1A;&#x575A;&#x679C;&#x6D3E;</li>
<li><strong>&#x516C;&#x4F17;&#x53F7;</strong>&#xFF1A;nutpi</li>
<li><strong>&#x7535;&#x8BDD;</strong>&#xFF1A;17752170152</li>
<li><strong>&#x5B98;&#x7F51;</strong>&#xFF1A;<a href="https://www.nutpi.net/" target="_blank">https://www.nutpi.net/</a></li>
<li>Issues&#xFF1A;<a href="https://gitcode.com/nutpi/uni-chinese-number-format/issues" target="_blank">https://gitcode.com/nutpi/uni-chinese-number-format/issues</a></li>
</ul>
<h2 id="&#x76F8;&#x5173;&#x94FE;&#x63A5;"><a name="&#x76F8;&#x5173;&#x94FE;&#x63A5;" class="plugin-anchor" href="#&#x76F8;&#x5173;&#x94FE;&#x63A5;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x76F8;&#x5173;&#x94FE;&#x63A5;</h2>
<ul>
<li><a href="https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html" target="_blank">UTS &#x8BED;&#x6CD5;</a></li>
<li><a href="https://uniapp.dcloud.net.cn/plugin/uts-plugin.html" target="_blank">UTS API &#x63D2;&#x4EF6;</a></li>
<li><a href="https://gitcode.net/dcloud/hello-uts" target="_blank">Hello UTS</a></li>
<li>&#x63D2;&#x4EF6;&#x5730;&#x5740;&#xFF1A;<a href="https://ext.dcloud.net.cn/plugin?id=23776" target="_blank">https://ext.dcloud.net.cn/plugin?id=23776</a></li>
<li>&#x4ED3;&#x5E93;&#x5730;&#x5740;&#xFF1A;<a href="https://gitcode.com/nutpi/uni-chinese-number-format/" target="_blank">https://gitcode.com/nutpi/uni-chinese-number-format/</a></li>
</ul>
<h2 id="&#x575A;&#x679C;&#x6D3E;"><a name="&#x575A;&#x679C;&#x6D3E;" class="plugin-anchor" href="#&#x575A;&#x679C;&#x6D3E;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x575A;&#x679C;&#x6D3E;</h2>
<p>&#x575A;&#x679C;&#x6D3E;&#x793E;&#x533A;&#x7531;&#x5C0F;&#x6CE2;&#x3001;&#x72FC;&#x54E5;&#x7B49;&#x4EBA;&#x521B;&#x5EFA;&#xFF0C;&#x56E2;&#x961F;&#x62E5;&#x6709;&#x6570;&#x4F4D;&#x534E;&#x4E3A;HDE&#x53CA;1000+HarmonyOS&#x5F00;&#x53D1;&#x8005;&#xFF0C;&#x4EE5;&#x53CA;&#x82E5;&#x5E72;&#x5176;&#x4ED6;&#x9886;&#x57DF;&#x7684;&#x4E09;&#x5341;&#x4F59;&#x4F4D;&#x4E07;&#x7C89;&#x535A;&#x4E3B;/UP&#x4E3B;&#x8FD0;&#x8425;&#x3002;</p>
<p>&#x4E13;&#x6CE8;&#x4E8E;&#x5206;&#x4EAB;&#x7684;&#x6280;&#x672F;&#x5305;&#x62EC;HarmonyOS/OpenHarmony&#x3001;&#x4ED3;&#x9889;&#x3001;ArkUI-X&#x3001;&#x5143;&#x670D;&#x52A1;&#x3001;AI&#x3001;BlueOS&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x7B49;&#x3002;&#x56E2;&#x961F;&#x6210;&#x5458;&#x4E3B;&#x8981;&#x805A;&#x96C6;&#x5728;&#x5317;&#x4EAC;&#xFF0C;&#x4E0A;&#x6D77;&#xFF0C;&#x5357;&#x4EAC;&#xFF0C;&#x6DF1;&#x5733;&#xFF0C;&#x5E7F;&#x5DDE;&#xFF0C;&#x82CF;&#x5DDE;&#x3001;&#x957F;&#x6C99;&#x3001;&#x5B81;&#x590F;&#x7B49;&#x5730;&#xFF0C;&#x76EE;&#x524D;&#x5DF2;&#x4E3A;&#x534E;&#x4E3A;&#x3001;vivo&#x3001;&#x817E;&#x8BAF;&#x3001;&#x4E9A;&#x9A6C;&#x900A;&#x4EE5;&#x53CA;&#x4E09;&#x65B9;&#x6280;&#x672F;&#x793E;&#x533A;&#x63D0;&#x4F9B;&#x5404;&#x7C7B;&#x5F00;&#x53D1;&#x54A8;&#x8BE2;&#x670D;&#x52A1;100+&#x3002;&#x7D2F;&#x8BA1;&#x7C89;&#x4E1D;100+w&#xFF0C;&#x5B75;&#x5316;&#x5F00;&#x53D1;&#x8005;10w+&#xFF0C;&#x9AD8;&#x6821;20+&#x3001;&#x4F01;&#x4E1A;10+&#x3002;&#x81EA;&#x7814;&#x5E94;&#x7528;40&#x6B3E;&#xFF0C;&#x4E09;&#x65B9;&#x5E93;80&#x4E2A;&#xFF0C;&#x9E3F;&#x8499;&#x539F;&#x751F;&#x5E94;&#x7528;&#x8BFE;&#x7A0B;500+&#x3002;&#x6301;&#x7EED;&#x52A9;&#x529B;&#x9E3F;&#x8499;&#x4ED3;&#x9889;&#x7B49;&#x751F;&#x6001;&#x7E41;&#x8363;&#x53D1;&#x5C55;&#x3002;</p>
<footer class="page-footer"><span class="copyright">powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2025-06-08 23:57:14
</span></footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                </div>
                <script src="https://my.openwrite.cn/js/readmore.js"></script>
                <script>
                    var enablePlugin = false;
                    var allowDomain = "localhost";
                    if(allowDomain){
                        var currentDomain = location.hostname;
                        if ($.isArray(allowDomain)) {
                            $.each(allowDomain, function(index, item) {
                                if (currentDomain == item) {
                                    enablePlugin = true;
                                    return false;
                                }
                            });
                        }else{
                           if (currentDomain == allowDomain) {
                                enablePlugin = true;
                            }
                        }
                    }else{
                        enablePlugin = true;
                    }
                    
                    if(enablePlugin){
                        var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
                        if (!isMobile) {
                            var btw = new BTWPlugin();
                            btw.init({"allowDomain":"localhost","blogId":"27976-1678928361372-483","name":"坚果派","qrcode":"https://luckly007.oss-cn-beijing.aliyuncs.com/images/image-20230316085818226.png","keyword":"鸿蒙坚果","id":"vip-container"});
                        }
                    }
                </script> 
          </section>
          
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>
 
          <div class="book-footer">
            
            <div class="donate">
              <div></div>
              <button class="donate-btn" onclick="showModal()">赞赏</button>
            </div>
             
            <div class="copyright"></div>
            
          </div>
          
        </div>
      </div>
      
    </div>

     
    <a
      href="2.uniappx插件nutpi-idcard 开发与使用指南（适配鸿蒙）.html"
      class="
        navigation navigation-prev
        
      "
      aria-label="Previous page: 7.2 uniappx插件nutpi-idcard开发与使用指南"
    >
      <i class="fa fa-angle-left"></i>
    </a>
     
    <a
      href="4.calendar插件.html"
      class="
        navigation navigation-next
        
      "
      aria-label="Next page: 7.4 calendar插件"
    >
      <i class="fa fa-angle-right"></i>
    </a>
      
  </div>
  <script>
    function showModal() {
      document.getElementsByClassName("mask")[0].style.display = "block";
      document.getElementsByClassName("donate-modal")[0].style.display =
        "block";
    }
    // 切换赞赏码
    function showDonateImg(num) {
      let alipay = "";
      let wxpay = ""
      if(num){
        wxpay = "hidden"
      }else{
        alipay = "hidden"
      }
      document.getElementById("wxpay-code").hidden = wxpay;
      document.getElementById("alipay-code").hidden = alipay;
      document.getElementsByName("pay-way")[num].checked = "checked";
    }

    // 关闭赞赏框
    function closeDonateModal() {
      document.getElementsByClassName("mask")[0].style.display = "none";
      document.getElementsByClassName("donate-modal")[0].style.display = "none";
    }

    var gitbook = gitbook || [];
    gitbook.push(function () {
      gitbook.page.hasChanged({"page":{"title":"7.3 chinese-number-format插件","level":"1.7.3","depth":2,"next":{"title":"7.4 calendar插件","level":"1.7.4","depth":2,"path":"chapter7/4.calendar插件.md","ref":"./chapter7/4.calendar插件.md","articles":[]},"previous":{"title":"7.2 uniappx插件nutpi-idcard开发与使用指南","level":"1.7.2","depth":2,"path":"chapter7/2.uniappx插件nutpi-idcard 开发与使用指南（适配鸿蒙）.md","ref":"./chapter7/2.uniappx插件nutpi-idcard 开发与使用指南（适配鸿蒙）.md","articles":[]},"dir":"ltr"},"config":{"plugins":["github-buttons@2.1.0","edit-link","splitter","tbfed-pagefooter","expandable-chapters","chapter-fold","back-to-top-button","code","pageview-count","popup","search-plus","-lunr","-search","splitter","-sharing","sharing-plus","theme-lou","mind-maps","emphasize","anchors","changyan","readmore","livereload","ace","livereload"],"root":".","styles":{"website":"styles/website.css"},"pluginsConfig":{"tbfed-pagefooter":{"modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"pluginsConfig":{"expandable-chapters":{}},"emphasize":{},"ace":{},"livereload":{},"splitter":{},"readmore":{"allowDomain":"localhost","blogId":"27976-1678928361372-483","name":"坚果派","qrcode":"https://luckly007.oss-cn-beijing.aliyuncs.com/images/image-20230316085818226.png","keyword":"鸿蒙坚果"},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"popup":{},"code":{"copyButtons":true},"theme-lou":{"hide-elements":[".summary .gitbook-link",".summary .divider"],"color":"#FF4848","book-anchor-title":"本章目录","copyright":{"author":"vx:nut_pie"},"forbidCopy":true,"logo":"assets/avatar.png","book-summary-title":"文章目录","search-placeholder":"输入关键字搜索","copyrightLogo":"assets/copyright.png","favicon":"assets/avatar.png","appleTouchIconPrecomposed152":"assets/avatar.png"},"changyan":{"appid":"cyvHoCPAs","conf":"0440cfc4168ba95d73cfc52dd4d5c60b"},"fontsettings":{"theme":"white","family":"sans","size":2},"mind-maps":{},"highlight":{},"back-to-top-button":{},"pageview-count":{},"github-buttons":{"repo":"ITmxs/gitbook","types":["star","watch","fork"],"size":"small"},"sharing":{"qq":false,"all":["qq","qzone","whatsapp","douban","facebook","google","instapaper","linkedin","messenger","twitter","weibo"],"douban":false,"facebook":false,"weibo":false,"twitter":false,"pocket":false,"google":false,"qzone":false},"edit-link":{"label":"编辑此页","base":"https://github.com/ITmxs/gitbook/edit/master/"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"expandable-chapters":{},"search-plus":{}},"theme":"default","author":"坚果派","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{"themeLou":{"nav":[{"target":"_blank","url":"https://www.nutpi.net/","name":"坚果派官网"},{"target":"_blank","url":"https://www.arkui.club/","name":"ArkUI实战"},{"target":"_blank","url":"https://space.bilibili.com/480883651","name":"元服务开发实践"},{"target":"_blank","url":"https://gitcode.com/nutpi","name":"OpenHarmony应用开发"}],"footer":{"donate":{"wechat":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png","message":"随意打赏，但不要超过一顿早餐钱 💕","wxpay":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png","alipay":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202843746.png","nickname":"breeze","button":"打赏","wechatText":"微信","alipayText":"支付宝","title":"『赠人玫瑰 🌹 手有余香 』","avatar":"http://xkapp-uat.oss-cn-hangzhou.aliyuncs.com/2e7a3f70-80ab-4b50-93ec-a04dfeef949b/avatar-100.png"},"copyright":true}}},"title":"uniapp/uniapp-x for Harmony教程","language":"zh-hans","gitbook":"*","description":"uniapp/uniapp-x for Harmony电子书教程"},"file":{"path":"chapter7/3.chinese-number-format插件.md","mtime":"2025-06-08T15:57:14.278Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2025-06-30T01:19:14.211Z"},"basePath":"..","book":{"language":""}});
    });
  </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-github-buttons/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-edit-link/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-mind-maps/mindmaps.dist.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-changyan/changyan.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-ace/ace/ace.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-ace/ace.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-theme-lou/lou.js"></script>
        
    

    </body>
</html>

